<?php

namespace IDock\Insurance\ZYIC\Request;

use Exception;
use IDock\Insurance\ZYIC\Request\AllZYICRequest;
use IDock\Insurance\ZYIC\Response\RenewalInquiryResponse;
use IDock\Visitor\RenewalInquiryVisitor;

class RenewalInquiryRequest extends AllZYICRequest
{
    public $route = 'channelInterface/V01';

    protected $response = RenewalInquiryResponse::class;

    protected $urlTip = '续保查询';

    /*** @var  RenewalInquiryVisitor $visitor */
    protected $visitor;

    /**
     * @return array
     * @throws Exception
     */
    public function generate(): array
    {
        $param = [
            'licenseNo' => $this->visitor->licenseNo,
            'frameNo' => $this->visitor->vin,
            'riskCode' => $this->visitor->argc['riskCode'],
        ];
        return $param;
    }
}
